Caret Position at Line Ends
Caret Position at Line Ends
Prior to this version of TextEdit, if spaces at the end of a line extended
beyond the edge of the view rectangle, TextEdit drew the caret outside the
view rectangle. This effect depended on the combination of line direction
(TESysJust) and line alignment (teJust).
TextEdit no longer draws the caret outside the view rectangle. The caret is
always drawn at the line end (that is, at the edge of the view rectangle) even
when spaces extend beyond the edge of the view rectangle.
When TextEdit determines that a new position for the caret is at the start or
end of a line, the line where the caret is displayed depends on the current caret
position and the value in the clikStuff field in the edit record. TextEdit sets
this field to reflect whether the most recent mouse-down event occurred on
the leading or trailing edge of a character. If the last mouse-down event was on
the leading edge of a character, the new caret position is at the line end that
corresponds to the leading edge of the new character offset. For example, in the
next figure, if the new caret position is at character offset 3, then the caret
appears at the end of the first line if the last mouse-down event was on the
trailing edge of a character.
This corresponds to a leading edge (clikStuff) value of FALSE. Otherwise, the
caret appears at the beginning of the second line.
The caret position at line end